<admintpl file="header" />
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:U('AdminFlow/member')}">流量池成员管理</a></li>
        <li class="active"><a href="" target="_self">修改</a></li>
    </ul>
    <form action="{:U('AdminFlow/modify_member_post')}" method="post" class="form-horizontal js-ajax-forms" enctype="multipart/form-data" onsubmit="return checkform();">
        <div class="row-fluid">
            <div class="span9">
                <table class="table table-bordered">
                    <tr>
                        <th>成员号码 <span class="form-required">*</span></th>
                        <td>
                            <input type="text" name="member_number" readonly  class="require" id="member_number" value="{$item.acc_nbr}" style="width: 400px" placeholder="请输入成员号码">
                        </td>
                    </tr>
                    <tr>
                        <th>状态 <span class="form-required">*</span></th>
                        <td>
                            <input type="text"  readonly class="require"  value="{$item.state}" style="width: 400px">
                        </td>
                    </tr>



                    <tr>
                        <th>限制类型 <span class="form-required">*</span></th>
                        <td>
                            <input type="text"  readonly class="require"  value="流量" style="width: 400px">
                        </td>
                    </tr>

                    <tr>
                        <th>生效时间 <span class="form-required">*</span></th>
                        <td>
                            <input type="text"  readonly class="require "  value="<php>echo date('Y-m-d')</php>" style="width: 400px">
                        </td>
                    </tr>
                    <tr>
                        <th>选择月套餐 <span class="form-required">*</span></th>
                        <td>
                           <select name="package_id" class="require">
                               <option value="">请选择</option>
                               <foreach name="package_list" item="vo">
                                   <option value="{$vo.package_id}" <if condition="$vo['package_data'] == $item['flow_quota']">selected</if>>{$vo.package_title_data}</option>
                               </foreach>
                           </select>

                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="form-actions">
            <input type="hidden" name="id" value="{$item.package_id}"/>
            <button class="btn btn-primary js-ajax-submit" type="submit">提交</button>
            <a class="btn" href="{:U('AdminFlow/index')}">返回</a>
        </div>
    </form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
<script>
    function check_form(){
        var package_type = $("input[name='package_type']:checked").val();
        console.log(package_type);
        var package_data = $("#package_data").val();
        var package_price = $("#package_price").val();
        if(package_data == ''){
            alert("流量值不能为空！");return false;
        }
        if(isNaN(package_data)){
            alert("流量值输入有误！");return false;
        }

        if(package_price == ''){
            alert("价格不能为空！");return false;
        }
        if(isNaN(package_price)){
            alert("价格输入有误！");return false;
        }
        return true;
    }
</script>
</body>
</html>